save command output to file